package cate.game.play.buff.h;

import cate.game.play.buff.Buff;
import cate.game.play.buff.BuffHandler;
import cate.game.play.proce.action.ctx.ActionCtx;

/**
 * 携带该状态的目标下回合会复制发起者1个正面状态,并净化自身1个负面状态
 */
public class 光焰BH extends BuffHandler {


	@Override
	public void onRoundBegin(ActionCtx action) {
		Buff goodBuff = buff.caster.buff.findOne(b -> b.isGood() && b.cfg.dispelAble());
		if (goodBuff != null) {
			buff.owner.buff.tryAddByTid(action, goodBuff.tid);
		}
		buff.owner.buff.tryDispelBad(action, 1);
	}
}
